package com.tanhua.dubbo.server.api;

import com.tanhua.dubbo.server.pojo.Publish;
import com.tanhua.dubbo.server.vo.PageInfo;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest
public class testQuanZiApi {
    @Autowired
    private QuanZiApi quanZiApi;
    @Test
    public void testQueryPublishList(){
         this.quanZiApi.queryPublishList(2L, 2, 2)
            .getRecords().forEach(publish -> System.out.println(publish));

    }
    @Test
    public void testLike(){
        Long userId=1L;
        String publish="5faf49327e529935e0b1c24a";
        Boolean data = this.quanZiApi.queryUserIsLike(userId, publish);
        System.out.println(data);

        System.out.println(this.quanZiApi.likeComment(userId, publish));

        System.out.println(this.quanZiApi.disLikeComment(userId, publish));

        System.out.println(this.quanZiApi.queryLikeCount(publish));
    }
}
